package com.ruoyi.web.controller.hf;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaIgnore;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.vo.HfuPayResultVo;
import com.ruoyi.system.domain.bo.DyAnchorBo;
import com.ruoyi.system.domain.bo.DyCustomerSumBo;
import com.ruoyi.system.domain.bo.DyOrderBo;
import com.ruoyi.system.domain.bo.DyOrderGoodsBo;
import com.ruoyi.system.domain.vo.DyAnchorCustomerVo;
import com.ruoyi.system.domain.vo.DyAnchorVo;
import com.ruoyi.system.service.IDyAnchorService;
import com.ruoyi.system.service.IDyOrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Arrays;
import java.util.List;

/**
 * 主播
 *
 * @author ruoyi
 * @date 2024-06-20
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/hfu/")
public class HfuPayController extends BaseController {

    private final IDyOrderService iDyOrderService;

    @PostMapping("/hfuPayResult")
    @SaIgnore
    public String hfuPayResult(HttpServletRequest request) {
        return iDyOrderService.hfuPayResult(request);
    }


    @PostMapping("/getHfuPayStatus")
    @SaIgnore
    public R<String> getHfuPayStatus(@RequestBody HfuPayResultVo hfuPayResultVo) {
        String b = iDyOrderService.getHfuPayStatus(hfuPayResultVo);
        return R.ok(b);
    }

}
